package org.millioncall.yueyoga.admin.service.impl;

import java.util.Map;

import org.millioncall.yueyoga.admin.dao.SiteDAO;
import org.millioncall.yueyoga.admin.model.Site;
import org.millioncall.yueyoga.admin.service.SystemService;
import org.springframework.stereotype.Service;

@Service
public class SystemServiceImpl implements SystemService {
	private SiteDAO siteDAO;

	public SiteDAO getSiteDAO() {
		return siteDAO;
	}

	public void setSiteDAO(SiteDAO siteDAO) {
		this.siteDAO = siteDAO;
	}

	@Override
	public boolean updateSystem(Map<String, Object> map) {
		int i = siteDAO.updateSite(map);
		if (i > 0) {
			return true;
		} else {
			return false;
		}
	}

	@Override
	public Site getSystem() {
		return siteDAO.getSite();
	}

}
